package com.ms.p2p.utils;

public class Lock {
	static Lock lock;

	public static Lock getInstance() {
		if (lock == null) {
			lock = new Lock();
		}
		return lock;
	}
	
	public static void main(String args[]){
		Doit t1 = new Doit();
	          Thread ta = new Thread(t1, "A"); 
	          Thread tb = new Thread(t1, "B"); 
		Thread t2 = new Thread();
         ta.start(); 
         tb.start(); 
		
	}
	
	
}
